/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.restaurant.domain;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author root
 */
@Entity
@Table(name = "roleprocess")
@XmlRootElement(name = "roleprocess")
@NamedQueries({
    @NamedQuery(name = "Roleprocess.findAll", query = "SELECT r FROM Roleprocess r"),
    @NamedQuery(name = "Roleprocess.findByRoleprocessID", query = "SELECT r FROM Roleprocess r WHERE r.roleprocessID = :roleprocessID"),
    @NamedQuery(name = "Roleprocess.findByYear", query = "SELECT r FROM Roleprocess r WHERE r.year = :year"),
    @NamedQuery(name = "Roleprocess.findByViewright", query = "SELECT r FROM Roleprocess r WHERE r.viewright = :viewright"),
    @NamedQuery(name = "Roleprocess.findByAdditionright", query = "SELECT r FROM Roleprocess r WHERE r.additionright = :additionright"),
    @NamedQuery(name = "Roleprocess.findByDeletionright", query = "SELECT r FROM Roleprocess r WHERE r.deletionright = :deletionright"),
    @NamedQuery(name = "Roleprocess.findByUpdationright", query = "SELECT r FROM Roleprocess r WHERE r.updationright = :updationright"),
    @NamedQuery(name = "Roleprocess.findByShowhide", query = "SELECT r FROM Roleprocess r WHERE r.showhide = :showhide"),
    @NamedQuery(name = "Roleprocess.findByCreateddate", query = "SELECT r FROM Roleprocess r WHERE r.createddate = :createddate"),
    @NamedQuery(name = "Roleprocess.findByDeleteddate", query = "SELECT r FROM Roleprocess r WHERE r.deleteddate = :deleteddate"),
    @NamedQuery(name = "Roleprocess.findByLastupdation", query = "SELECT r FROM Roleprocess r WHERE r.lastupdation = :lastupdation"),
    @NamedQuery(name = "Roleprocess.findByIsdeleted", query = "SELECT r FROM Roleprocess r WHERE r.isdeleted = :isdeleted")})
public class Roleprocess implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "RoleprocessID")
    private Long roleprocessID;
    @Column(name = "year")
    @Temporal(TemporalType.DATE)
    private Date year;
    @Column(name = "viewright")
    private Short viewright;
    @Column(name = "additionright")
    private Short additionright;
    @Column(name = "deletionright")
    private Short deletionright;
    @Column(name = "updationright")
    private Short updationright;
    @Column(name = "showhide")
    private Short showhide;
    @Column(name = "createddate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date createddate;
    @Column(name = "deleteddate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date deleteddate;
    @Column(name = "lastupdation")
    @Temporal(TemporalType.TIMESTAMP)
    private Date lastupdation;
    @Column(name = "isdeleted")
    private Boolean isdeleted;
    @JoinColumn(name = "employee_EmployeeID_deletedby", referencedColumnName = "EmployeeID")
    @ManyToOne
    private Employee employee;
    @JoinColumn(name = "employee_EmployeeID_updatedby", referencedColumnName = "EmployeeID")
    @ManyToOne
    private Employee employee1;

    public Roleprocess() {
    }

    public Roleprocess(Long roleprocessID) {
        this.roleprocessID = roleprocessID;
    }

    public Long getRoleprocessID() {
        return roleprocessID;
    }

    public void setRoleprocessID(Long roleprocessID) {
        this.roleprocessID = roleprocessID;
    }

    public Date getYear() {
        return year;
    }

    public void setYear(Date year) {
        this.year = year;
    }

    public Short getViewright() {
        return viewright;
    }

    public void setViewright(Short viewright) {
        this.viewright = viewright;
    }

    public Short getAdditionright() {
        return additionright;
    }

    public void setAdditionright(Short additionright) {
        this.additionright = additionright;
    }

    public Short getDeletionright() {
        return deletionright;
    }

    public void setDeletionright(Short deletionright) {
        this.deletionright = deletionright;
    }

    public Short getUpdationright() {
        return updationright;
    }

    public void setUpdationright(Short updationright) {
        this.updationright = updationright;
    }

    public Short getShowhide() {
        return showhide;
    }

    public void setShowhide(Short showhide) {
        this.showhide = showhide;
    }

    public Date getCreateddate() {
        return createddate;
    }

    public void setCreateddate(Date createddate) {
        this.createddate = createddate;
    }

    public Date getDeleteddate() {
        return deleteddate;
    }

    public void setDeleteddate(Date deleteddate) {
        this.deleteddate = deleteddate;
    }

    public Date getLastupdation() {
        return lastupdation;
    }

    public void setLastupdation(Date lastupdation) {
        this.lastupdation = lastupdation;
    }

    public Boolean getIsdeleted() {
        return isdeleted;
    }

    public void setIsdeleted(Boolean isdeleted) {
        this.isdeleted = isdeleted;
    }

    public Employee getEmployee() {
        return employee;
    }

    public void setEmployee(Employee employee) {
        this.employee = employee;
    }

    public Employee getEmployee1() {
        return employee1;
    }

    public void setEmployee1(Employee employee1) {
        this.employee1 = employee1;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (roleprocessID != null ? roleprocessID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Roleprocess)) {
            return false;
        }
        Roleprocess other = (Roleprocess) object;
        if ((this.roleprocessID == null && other.roleprocessID != null) || (this.roleprocessID != null && !this.roleprocessID.equals(other.roleprocessID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.restaurant.domain.Roleprocess[roleprocessID=" + roleprocessID + "]";
    }

}
